import requests
from bs4 import BeautifulSoup
url = 'https://blog.qingke.me/channel/4'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')

with open('blog.txt', 'w') as file:
    for li in soup.find_all('li', {"class": "content"}):
        title = li.a.get_text()
        intro = li.find('div', {"class": "item-text"}).get_text()
        file.write(f'{title}\n{intro}\n')
        file.write('==================\n')
